namespace LiteNetLib
{
	public sealed class NetStatistics
	{
		public ulong PacketsSent;

		public ulong PacketsReceived;

		public ulong BytesSent;

		public ulong BytesReceived;

		public ulong PacketLoss;

		public ulong SequencedPacketLoss;

		public ulong PacketLossPercent
		{
			get
			{
				if (PacketsSent != 0L)
				{
					return PacketLoss * 100 / PacketsSent;
				}
				return 0uL;
			}
		}

		public void Reset()
		{
			PacketsSent = 0uL;
			PacketsReceived = 0uL;
			BytesSent = 0uL;
			BytesReceived = 0uL;
			PacketLoss = 0uL;
		}

		public override string ToString()
		{
			return string.Format("BytesReceived: {0}\nPacketsReceived: {1}\nBytesSent: {2}\nPacketsSent: {3}\nPacketLoss: {4}\nPacketLossPercent: {5}\n", BytesReceived, PacketsReceived, BytesSent, PacketsSent, PacketLoss, PacketLossPercent);
		}
	}
}
